<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-problem-edit" >
		<input id="problemId" name="problemId"th:value="${problem.problemId}"  type="hidden">
			<div class="form-group">
			<label class="col-sm-3 control-label">标题：</label>
			<div class="col-sm-8">
				<input id="title" name="title"th:value="${problem.title}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">描述：</label>
			<div class="col-sm-8">
				<input id="description" name="description"th:value="${problem.description}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">样例输入：</label>
			<div class="col-sm-8">
				<input id="input" name="input"th:value="${problem.input}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">样例输出：</label>
			<div class="col-sm-8">
				<input id="output" name="output"th:value="${problem.output}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">用例输入：</label>
			<div class="col-sm-8">
				<input id="sampleInput" name="sampleInput"th:value="${problem.sampleInput}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">用例输出：</label>
			<div class="col-sm-8">
				<input id="sampleOutput" name="sampleOutput"th:value="${problem.sampleOutput}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">特定Judger：</label>
			<div class="col-sm-8">
				<input id="spj" name="spj"th:value="${problem.spj}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">提示：</label>
			<div class="col-sm-8">
				<input id="hint" name="hint"th:value="${problem.hint}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">：</label>
			<div class="col-sm-8">
				<input id="source" name="source"th:value="${problem.source}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">时间限制：</label>
			<div class="col-sm-8">
				<input id="timeLimit" name="timeLimit"th:value="${problem.timeLimit}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">内存限制：</label>
			<div class="col-sm-8">
				<input id="memoryLimit" name="memoryLimit"th:value="${problem.memoryLimit}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">是否锁定：</label>
			<div class="col-sm-8">
				<!--<input id="defunct"  name="defunct"th:value="${problem.defunct}" class="form-control time-input" type="text"> -->
				<div class="onoffswitch">
					<input type="checkbox" th:checked="${problem.defunct? true : false}" class="onoffswitch-checkbox" id="defunct" name="defunct">
					<label class="onoffswitch-label" for="defunct">
						<span class="onoffswitch-switch"></span>
						<span class="onoffswitch-inner"></span>
					</label>
				</div>
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">AC次数：</label>
			<div class="col-sm-8">
				<input id="accepted" name="accepted"th:value="${problem.accepted}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">已解次数：</label>
			<div class="col-sm-8">
				<input id="solved" name="solved"th:value="${problem.solved}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">提交次数：</label>
			<div class="col-sm-8">
				<input id="submit" name="submit"th:value="${problem.submit}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">提交者：</label>
			<div class="col-sm-8">
				<input id="submitUser" name="submitUser"th:value="${problem.submitUser}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">命题人：</label>
			<div class="col-sm-8">
				<input id="author" name="author"th:value="${problem.author}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">命题时间：</label>
			<div class="col-sm-8">
				<input id="createDate"  name="createDate"th:value="${problem.createDate}" class="form-control time-input" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">难易度：</label>
			<div class="col-sm-8">
				<input id="difficulty" name="difficulty"th:value="${problem.difficulty}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">比率：</label>
			<div class="col-sm-8">
				<input id="ratio" name="ratio"th:value="${problem.ratio}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">标签：</label>
			<div class="col-sm-8">
				<input id="tag" name="tag"th:value="${problem.tag}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">赛事编号：</label>
			<div class="col-sm-8">
				<input id="contestId" name="contestId"th:value="${problem.contestId}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">测试者：</label>
			<div class="col-sm-8">
				<input id="ojName" name="ojName"th:value="${problem.ojName}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">：</label>
			<div class="col-sm-8">
				<input id="ojPid" name="ojPid"th:value="${problem.ojPid}" class="form-control" type="text">
			</div>
		</div>
				<div class="form-group">
			<label class="col-sm-3 control-label">：</label>
			<div class="col-sm-8">
				<input id="isvirtual" name="isvirtual"th:value="${problem.isvirtual}" class="form-control" type="text">
			</div>
		</div>
		</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
	var prefix = ctx + "acm/problem";
	$("#form-problem-edit").validate({
		onkeyup: false,
		rules:{
			xxxx:{
				required:true,
			},
		}
	});

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/editDo", $('#form-problem-edit').serialize());
		}
	}
</script>
</body>
</html>
